<?php
/**
 * This page handles the landing page
 * The landing page is the home page of the entire website. Found at /
 * 
 * This page can be accessed using mod_rewrite or normally through / or /index.php
 */

    require_once('../SiteIncludes.GLOBAL.php');
    
    
    
    /**
     * -------------------------------------
     *      Recently Added Tools Feed 
     * -------------------------------------
     */
    $announcements_title = "Recently Added Tools";
    $announcements_url = "http://www.eclipse.org";
    $announcements_feed_items = array();
    $query = $sql_conx->query("SELECT `pid` FROM `tool_project` WHERE `visible`='1' ORDER BY `creation_time` DESC LIMIT 5;");
    while($row = $query->fetch_assoc()) {
	$item =& $ProjectStash->stash((int)$row['pid']);
	$date = date("d/m/Y", $item->getCreationTime());
	$title = $item->getName();
	$url = EclipseMDE::aliasLink($item->getAlias());
	$description = $item->getDescription();
	$icon = $item->getIconURL();
	$announcements_feed_items[] = $Templater->makecontentfeeditem($date, $title, $url, $description, $icon);
    }
    /**
     *	     Recently Added Tools Feed
     * --------------- End --------------- 
     */
    
    $rss_html = '<a href="'.$_ECLIPSEMDE['BASE_URL'].'/rss/newest.rss"><img src="/img/rss2.gif" style="width: 16px; height: 16px;" alt="RSS Feed" /></a>';
    $TemplateEngine->create_content_html($Templater->maincontent_feed($announcements_title, $announcements_url, $announcements_feed_items, $rss_html));
    
    //$TemplateEngine->create_sidebar_html($Templater->createSidebarItem('Twitter Feed', $Templater->maketwitterFeed('eclipsezone')));
    $TemplateEngine->setHasSidebar(false);
    $TemplateEngine->setCentralContentFullWidth(true);
    $TemplateEngine->render();
?>
      